package controler;

import java.sql.*;

public class ConnectionManager {
    private static Connection connection;

    private static String driver = "org.apache.derby.jdbc.EmbeddedDriver";

    public static void connect(String path) throws ClassNotFoundException, SQLException
    {
        Class.forName(driver);
        connection = DriverManager.getConnection("jdbc:derby:"+path+";create=true");
        
    }

    public static void disconnect() throws SQLException{
    	connection.close();
    }
    
    public static Connection getConnection(){
    	return connection;
    }
    
}

